import BaseManager from "../BaseManager";
import { SDK } from "./SDK";
import AppConfig from "../../AppConfig";
import EnumData from "../../Enum/EnumData";
import { WxSDK } from "./WxSDK";

export default class SDKManager extends BaseManager{

    private _sdk:SDK;

    public get SDK():SDK {
        return this._sdk;
    }

    public Init(): void {
        let clientType = AppConfig.ClientType
        switch (clientType) {
            case EnumData.ClientType.Web:
                this._sdk = new SDK();
                break;
            case EnumData.ClientType.Wechat:
                this._sdk = new WxSDK();
                break;
            default:
                this._sdk = new SDK();
                break;
        }
    }
}